home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / love4th.zip / DEMO-LD.DEM < prev    next >
Text File  |  1991-10-01  |  745b  |  33 lines

  1. |O|Dalso ourdemo  : junk ;    last demo-hs !|E
  2. |"In the following, note how a new screens file is created"
  3. |"and how easy it is to mix screens and text."
  4. |L|"Note how easy it is to use DOS commands from within LOVE-Forth."
  5. |Fpage
  6. |A|Kopen-new" 1demo.scr"
  7. DOS DIR/W
  8. |"Notice the new file, 1demo.scr"
  9. |F1 edit ( editor with built-in help: uses control-x )|L|F
  10. : Hello  ( -- )
  11.   10 0
  12.   dl   ." Hello" cr
  13.   loop ." Done" ;
  14. |Ff1 load
  15. |O|" After an error, 'EL' may be used to edit the bad screen"
  16. |Kel|L|F
  17.  
  18.  
  19. of 1 load
  20. Hello
  21. forget Hello
  22. el|L|F
  23. 
  24. \ Now demonstrating file nesting:
  25. include" 2demo.txt"
  26. .( On screen: ) blk @ .f|F
  27. DOS type 2demo.txt
  28. 1 load|L|F
  29. cr intro|L|F
  30. "close
  31. DOS del 1demo.scr
  32. |F|Bourdemo to-menu
  33.